<?php 

function pkReturnUserInfo($userInfo,$roomID){	
	$config = new Config();	
	$roomModel = new RoomModel();			
	$roomInfo  = $roomModel->getRowByWhere(array("id"=>$roomID),null,"DeskMaxHuman");
	if(!isset($roomInfo['DeskMaxHuman'])){
		return false;
	}
	$newUserInfo = array();
        /*
         * @ edit 
         * @ param zhangxu
         * @ desc 数组的值k 与 seat是相等的;
         */
	for($i=0;$i<$roomInfo['DeskMaxHuman'];$i++){
		if(isset($userInfo[$i])){
			$user = $userInfo[$i];
		}else{					
			$user = $config->getKey("gameUserInfoTemp")->get();
		}
        $user['pk'] = !empty($user['pk'])?$user['pk']:array();
		$user['seat'] = $i;
		$newUserInfo[] = $user;
	}
	
	return $newUserInfo;
}

